package com.sdx.console.meet.service;

import java.util.List;

import com.sdx.console.customer.entity.CustomerInfo;
import org.beetl.sql.core.engine.PageQuery;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.console.meet.dao.MeetRecordDao;
import com.sdx.console.meet.entity.MeetRecord;
import com.ibeetl.admin.core.service.BaseService;

/**
 * MeetRecord Service
 */

@Service
@Transactional
public class MeetRecordService extends BaseService<MeetRecord>{

    @Resource
	private MeetRecordDao meetRecordDao;

    public PageQuery<MeetRecord>queryByCondition(PageQuery query){
        PageQuery ret =  meetRecordDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelMeetRecord(List<String> ids){
        try {
            meetRecordDao.batchDelMeetRecordByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除MeetRecord失败", e);
        }
    }

    public List<CustomerInfo> queryMeetTeacher(Integer meetId){
        return meetRecordDao.queryMeetTeacher(meetId);
    }

	public List<MeetRecord> all() {
		return meetRecordDao.all();
		}
}
